package com.syg.springboot11.lombok;

import lombok.Getter;
import lombok.Setter;
import lombok.ToString;

import javax.validation.constraints.NotBlank;
import javax.validation.constraints.NotNull;

/**
 * 使用lombok精简代码
 */
@Getter
@Setter
@ToString
public class UserVO {

    @NotBlank(message = "年龄不能为空")
    private int age;
    @NotNull(message = "姓名不能为空")
    private String name;
    private String height;

    public static void main(String[] args) {
        UserVO userVO = new UserVO();
        userVO.setAge(2);

    }
}
